var log = document.querySelector('#log');
var pre = document.querySelector('pre');
log.addEventListener('click', function () {
  var username = document.querySelector('[name = username]').value;
  var password = document.querySelector('[name = username]').value;
  var gender = document.querySelecror('[name = gender]').checked;
  var loveME = document.querySelector('[name = loveME]').cheched;

  console.log('username:', username);
  console.log('password:', password);
  console.log('gender:', gender);
  console.log('love_me:', loveME);

  pre.innerHTML = `username: ${username}\npassword: ${password}\ngender: ${gender}\nloveME: ${loveME}`;
});